package com.designpattern.structure.combination;

/**
 * @author Administration
 * @date 2021/10/19 - 10:38 - 星期二
 * @project 结构型模式中的组合模式   抽象根节点（Component）
 * @package com.designpattern.structure.combination
 * @by 晨
 */
public abstract class MenuComponent {

    protected String name;

    protected Integer level;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public void add (MenuComponent menuComponent) {
        throw new UnsupportedOperationException();
    }

    public void remove (MenuComponent menuComponent) {
        throw new UnsupportedOperationException();
    }

    public MenuComponent getChild(int i){
        throw new UnsupportedOperationException();
    }

    public void print(){
        throw new UnsupportedOperationException();
    }
}
